package com.zb;

import com.zb.util.ClientUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableDiscoveryClient
public class MyCanalApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(MyCanalApplication.class, args);
        ClientUtil bean = run.getBean(ClientUtil.class);
        bean.main();
    }

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }


}
